<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/7/4
  Time: 14:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ page import="mybatis.pojo.Grade" %>
<%@ page import="mybatis.pojo.Subject" %>
<%@ page import="mybatis.services.GradeServerices" %>
<%@ page import="mybatis.services.SubjectServerices" %>
<%@ page import="java.util.List" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>超市账单管理系统</title>
    <link rel="stylesheet" href="css/public.css"/>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<%

%>

<!--主体内容-->
<section class="publicMian ">

    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>课程管理</span>
        </div>

        <div class="search">
            <form action="findSubject.jsp" method="post">
            <span>课程名称名称：</span>
            <input type="text" placeholder="请输入课程的名称" name="subName"/>
            <input type="submit" value="查询" />
            </form>
            <a href="SubjectAdd.jsp">添加</a>
        </div>

        <!--供应商操作表格-->
        <table class="providerTable" cellpadding="0" cellspacing="0">
            <tr class="firstTr">
                <th width="10%">编号</th>
                <th width="20%">课程名</th>
                <th width="10%">课时</th>
                <th width="10%">年级</th>

                <th width="30%">操作</th>
            </tr>
            <%
                List<Subject> datas = SubjectServerices.ME.findAll(2,10);
                for(Subject s:datas){
            %>
            <tr>
                <td><%=s.getId()%></td>
                <td><%=s.getSubjectname()%></td>
                <td><%=s.getClasshour()%></td>
                <td><%=s.getGradeid()%></td>


                <td>
                    <a href="providerView.html"><img src="img/read.png" alt="查看" title="查看"/></a>
                    <a href="subjectUpdate.jsp?suBid=<%=s.getId()%>"><img src="img/xiugai.png" alt="修改" title="修改"/></a>
                    <a href="subjectDelete.jsp?id=<%=s.getId()%> "class="removeProvider" onclick="return confirm('确认是否删除')"><img src="img/schu.png" alt="删除" title="删除"/></a>
                </td>
            </tr>
            <%}%>
        </table>

    </div>
</section>

<!--点击删除按钮后弹出的页面-->
<div class="zhezhao"></div>
<div class="remove" id="removeProv">
    <div class="removerChid">
        <h2>提示</h2>
        <div class="removeMain" >
            <p>你确定要删除该供应商吗？</p>
            <a href="#" id="yes">确定</a>
            <a href="#" id="no">取消</a>
        </div>
    </div>
</div>

</body>
</html>
